Skip to content

Added ability to receive updates from sqlite3_update_hook#1267

Merged
daniellockyer merged 1 commit into
TryGhost:masterfrom
soukand:sqlite3_update_hook
Sep 13, 2022
Merged

Added ability to receive updates from sqlite3_update_hook#1267
daniellockyer merged 1 commit into
TryGhost:masterfrom
soukand:sqlite3_update_hook

Conversation

@soukand

@soukand soukand commented Dec 25, 2019

Copy link
Copy Markdown
Contributor

Currently there are event insert/update/delete events defined on javascript side, but they are not working c++ side.
The code was already implemented in pull request #1174, but tests weren't added, so i decided to add them myself.

Error: update is not a valid configuration option
    at Database.addListener.Database.on (D:\dvp\study_stack\cloudfs\node_modules\sqlite3\lib\sqlite3.js:154:14)
    at SQLITE.on (D:\dvp\study_stack\cloudfs\libs\sql.js:74:15)
    at test.run (D:\dvp\study_stack\cloudfs\test.js:12:14)
    at <anonymous> Error: update is not a valid configuration option
    at Database.addListener.Database.on (D:\dvp\study_stack\cloudfs\node_modules\sqlite3\lib\sqlite3.js:154:14)
    at SQLITE.on (D:\dvp\study_stack\cloudfs\libs\sql.js:74:15)
    at test.run (D:\dvp\study_stack\cloudfs\test.js:12:14)
    at <anonymous>

@cuberoot

Copy link
Copy Markdown

This would sure be useful. Any updates?

@kewde

kewde commented Feb 20, 2020

Copy link
Copy Markdown
Collaborator

Triggering CI again, this PR looks good.
Sorry for the delay.

@kewde kewde closed this Apr 19, 2020
@kewde kewde reopened this Apr 19, 2020
@tiendq

tiendq commented Sep 15, 2020

Copy link
Copy Markdown

Is it still open due to conflicts in database.cc?

Comment thread src/database.cc Outdated
@justinmoon

Copy link
Copy Markdown

This would be very useful for my project

@aceslick911

Copy link
Copy Markdown

+1 this :)

@daniellockyer

Copy link
Copy Markdown
Contributor

@soukand Would you be able to rebase the PR? 🙂

@maxpert

maxpert commented Aug 18, 2022

Copy link
Copy Markdown

+1 this will be a game changer for what I am working on. Can we get this merged?

@volkanunsal

Copy link
Copy Markdown

We need this too. Are there any plans to merge it anytime soon?

@daniellockyer

Copy link
Copy Markdown
Contributor

Hi all! 👋🏻 I am working on rebasing this myself but currently running into a situation where it causes the process to hang. I should have some more time next week to work on it 🙂

@daniellockyer daniellockyer changed the title added ability to receive updates from sqlite3_update_hook Added ability to receive updates from sqlite3_update_hook Sep 13, 2022
closes TryGhost#419

- this adds support for a `change` event which forwards events arising
  from `sqlite3_update_hook`
@daniellockyer daniellockyer merged commit 946a3f6 into TryGhost:master Sep 13, 2022
@daniellockyer

Copy link
Copy Markdown
Contributor

Thanks for the patience everyone - this will be released shortly 🙂

@codebrainz

Copy link
Copy Markdown

This seems to be missing from the documentation. Is there a more up-to-date API documentation than the Github wiki?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants